<template>
	<view class="layout">
		<demo-child ref="child"></demo-child>
		<button @click="update">点击修改子值</button>
		
        <!-- <view  class="child-value">
			<view>子主件的属性值</view>
			<view>{{child.str}}</view>
			<view>{{child.count}}</view>
		</view> -->

        <navigator  url="/pages/demo6/demo6?name=王五&age=20">
			<button>跳转到demo6,并且携带参数</button>
		</navigator>
		
			
	</view>
</template>

<script setup>
import {onMounted, ref} from "vue";

const child = ref(null);
const update = function(){
	child.value.updateCount()
}


onMounted(()=>{
	console.log(child.value);
})


</script>

<style lang="scss" scoped>
button{
	margin: 10px;
}

.child-value {
	border: 1px solid rgba(0, 0, 0, .2);
	margin: 0 10px;
	border-radius: 5px;
	padding: 5px 10px;
    
	view{
		 font-size: 14px;
	}

	:first-child{
		 font-size: 16px;
		font-weight: bold;
		color: rgba(0, 0, 0, .2);
		margin: 5px 0px;
	}
}
</style>
